<template>
  <ul class="contact-container">
    <li class="item">
      <a href="">
        <div class="icon"><Icon type="github" /></div>
        <p>{{ data.githubName }}</p>
      </a>
    </li>
    <li class="item">
      <a :href="`mailto:${data.mail}`">
        <div class="icon"><Icon type="mail" /></div>
        <p>{{ data.mail }}</p>
      </a>
    </li>
    <li class="item">
      <a
        :href="`tencent://message/?Menu=yes&uin=${data.qq}&Service=300&sigT=45a1e5847943b64c6ff3990f8a9e644d2b31356cb0b4ac6b24663a3c8dd0f8aa12a595b1714f9d45`"
      >
        <div class="icon"><Icon type="qq" /></div>
        <p>{{ data.qq }}</p>
        <div class="pop">
          <img :src="data.qqQrCode" alt="" />
        </div>
      </a>
    </li>
    <li class="item">
      <a href="mailto:923575074@qq.com">
        <div class="icon"><Icon type="chat" /></div>
        <p>{{ data.weixin }}</p>
        <div class="pop">
          <img :src="data.weixinQrCode" alt="" />
        </div>
      </a>
    </li>
  </ul>
</template>

<script>
import { mapState } from "vuex";
import Icon from "../../Icon/index.vue";
export default {
  components: {
    Icon,
  },
  computed: {
    ...mapState("setting", ["loading", "data"]),
  },
};
</script>

<style lang="less" scoped>
@import "~@/styles/mixin.less";
@import "~@/styles/var.less";
ul,
li {
  list-style: none;
  margin: 0;
  padding: 0;
}
.contact-container {
  width: 100%;
  padding: 10px;
  color: @lightWords;
  li {
    position: relative;
    padding: 10px;
    &:hover {
      .pop {
        display: block;
      }
    }
    a {
      height: 28px;
      cursor: pointer;
      display: flex;
      align-items: center;
      .icon {
        font-size: 24px;
      }
      p {
        margin-left: 10px;
        font-size: 16px;
      }
      .pop {
        display: none;
        width: 150px;
        height: 150px;
        padding: 10px;
        background-color: #fff;
        border-radius: 5px;
        position: absolute;
        bottom: 50px;
        transition: all 2s linear 1s;
        &::after {
          content: "";
          width: 0;
          height: 0;
          border: 8px solid #fff;
          border-left-color: transparent;
          border-right-color: transparent;
          border-bottom-color: transparent;
          position: absolute;
          left: 80px;
          bottom: -15px;
        }
        img {
          width: 150px;
          height: 150px;
        }
      }
    }
  }
}
</style>